package com.kongl.lottery.user.vo;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class ResultVo<T> {
    private boolean status;
    private String msg;
    private T data;

    public static <T> ResultVo<T> success(){
        return success(null);
    }
    public static <T> ResultVo<T> success(T data){
        return (ResultVo<T>) builder().status(true).data(data).build();
    }
    public static ResultVo error(String msg){
        return builder().status(false).msg(msg).build();
    }
}
